package cc.fs.zhihuapp.model;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by fostion on 2015/8/18.
 */
public class DayNews implements Parcelable {

    String date;
    ArrayList<News> stories;
    ArrayList<News> top_stories;

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public ArrayList<News> getStories() {
        return stories;
    }

    public void setStories(ArrayList<News> stories) {
        this.stories = stories;
    }

    public ArrayList<News> getTop_stories() {
        return top_stories;
    }

    public void setTop_stories(ArrayList<News> top_stories) {
        this.top_stories = top_stories;
    }

    @Override
    public String toString() {
        return "DayNews{" +
                "date='" + date + '\'' +
                ", stories=" + stories +
                ", top_stories=" + top_stories +
                '}';
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.date);
        dest.writeTypedList(stories);
        dest.writeTypedList(top_stories);
    }

    public DayNews() {
    }

    protected DayNews(Parcel in) {
        this.date = in.readString();
        this.stories = in.createTypedArrayList(News.CREATOR);
        this.top_stories = in.createTypedArrayList(News.CREATOR);
    }

    public static final Parcelable.Creator<DayNews> CREATOR = new Parcelable.Creator<DayNews>() {
        public DayNews createFromParcel(Parcel source) {
            return new DayNews(source);
        }

        public DayNews[] newArray(int size) {
            return new DayNews[size];
        }
    };
}
